<?php
    
    if (!defined("_SANCMS")) exit("illetéktelen hozzáférés!");
    
    date_default_timezone_set("Europe/Budapest");
    
    $db_postfix = 'PG';
    
    require_once('_class/UrlParser.php');
    require_once('_class/DBase'.$db_postfix.'.php');
    require_once('_class/CLoader.php');
    require('_class/Smarty/libs/Smarty.class.php');
    
    $GLOBALS['smarty'] = new Smarty();
    $GLOBALS['smarty']->template_dir = 'Templates';
    $GLOBALS['smarty']->compile_dir = 'Compile';
    
    $GLOBALS['UrlParser'] = new UrlParser;
    
    $GLOBALS['DBase'] = new Dbase;
    
    $GLOBALS['CLoader'] = new CLoader;
    
    $GLOBALS['sql'] = array('localhost','banyusx3','seggem','sancms');
    
    if ($GLOBALS['UrlParser']->get_n_param(1) !== 0){
	
	$GLOBALS['base_url'] = $GLOBALS['UrlParser']->get_n_param(1);
	
    }else{
	
	$GLOBALS['base_url'] = 'index';
	
    }
    
    $GLOBALS['sub_url'] = $GLOBALS['UrlParser']->get_n_param(2);
    
    $GLOBALS['subsub_url'] = $GLOBALS['UrlParser']->get_n_param(3);
    
    $GLOBALS['CLoader']->load($GLOBALS['base_url'],$GLOBALS['sql']);

?>